package todo_plan

import "github.com/gin-gonic/gin"

func PlanViewInit(e *gin.Engine) {
	view := NewPlanView()
	//init url
	planURLInit(e, view)

	//init task
	//planTaskInit(e, view)
}

func planURLInit(e *gin.Engine, view *PlanView) {
	e.GET("/api/plan/search", view.searchPlanInfoView)
	e.POST("/api/plan/create", view.createPlanInfoView)
	e.POST("/api/plan/update", view.updatePlanInfoView)
	e.POST("/api/plan/delete", view.deletePlanInfoView)
	e.GET("/api/plan/detail", view.detailPlanInfoView)

	e.GET("/api/plan/calender", view.getCalendarInfoView)
	e.POST("/api/plan/calender/create", view.createPlanCalendarInfoView)
	e.POST("/api/plan/calender/update", view.updatePlanCalendarInfoView)
	e.POST("/api/plan/calender/delete", view.deletePlanCalendarInfoView)
}
